import Vue from 'vue';

import Table from './table';
import ImageUpload from './image-upload';
import FileUpload from './file-upload';
import FileDownload from './file-download';
import DivideTitle from './divide-title';
import IconButton from './icon-button';
import SelectDictionary from './select-dictionary';
import TinymceEditor from './tinymce-editor';
import TimeRangePicker from './time-range-picker/index.vue';
import Countdown from './countdown.vue';
import VirtualTable from './virtual-table.vue';
import inputGroup from './input-group.vue';

const baseCommonComponent = {
  install() {
    Vue.component('base-table', Table); // 列表
    Vue.component('base-image-upload', ImageUpload);  // 图片上传
    Vue.component('base-file-upload', FileUpload);  // 文件上传
    Vue.component('base-file-download', FileDownload);  // 文件下载
    Vue.component('base-divide-title', DivideTitle);  // 标题
    Vue.component('base-icon-button', IconButton);  // 图标按钮，带 tooltip
    Vue.component('base-select-dictionary', SelectDictionary); // 字典下拉
    Vue.component('base-tinymce-editor', TinymceEditor); // quill 富文本编辑器
    Vue.component('base-time-range-picker', TimeRangePicker); // 日期时间范围选择器，支持快捷选择时间范围
    Vue.component('base-countdown', Countdown); // 倒计时
    Vue.component('base-virtual-table', VirtualTable); // 大数据表格
    Vue.component('base-input-group', inputGroup);
  },
};

export default baseCommonComponent;
